import {
    request
} from '../utils/request'



export const addComment = (data) => {
    return request(
        'POST',
        '/spcolumn/web/comment/add',
        data
    )
}


// 用户注册
export const register = (data) => {
    return request(
        'POST',
        '/user/app/register',
        data
    )
}


// 用户登出
export const logout = (data) => {
    return request(
        'POST',
        '/user/web/logout',
        data
    )
}

// 获取个人提现列表
export const getextractlist = (params) => {
    return request(
        'GET',
        '/user/web/personal/extract/list',
        params
    )
}

// 获取个人收益明细列表
export const getmoneylist = (params) => {
    return request(
        'GET',
        '/user/web/rev/money/list',
        params
    )
}


// 获取个人订单列表
export const getorderlist = (params) => {
    return request(
        'GET',
        '/user/web/order/list',
        params
    )
}



// 获取团队管理列表
export const getteamlist = (params) => {
    return request(
        'GET',
        '/user/web/my/team/pList',
        params
    )
}


// 获取我的伙伴列表
export const getpartnerslist = (params) => {
    return request(
        'GET',
        '/user/web/my/shared/partners',
        params
    )
}

// 获取某人团队列表-直接下级
export const getdirectlist = (params) => {
    return request(
        'GET',
        '/user/web/team/direct',
        params
    )
}


// 获取某人的提现列表-
export const getuserextractlist = (params) => {
    return request(
        'GET',
        '/user/web/extract/list',
        params
    )
}


// 获取短信验证码-
export const getcheckCode = (params) => {
    return request(
        'GET',
        '/user/get/checkCode',
        params
    )
}


// 获取直属加盟列表-
export const getdirectdirect = (params) => {
    return request(
        'GET',
        '/user/web/my/direct/direct',
        params
    )
}


// 购买下单-
export const submitOrder = (data) => {
    return request(
        'POST',
        '/user/web/order/submit',
        data
    )
}

// 去支付-
export const pay = (data) => {
    return request(
        'POST',
        '/user/web/order/to/pay',
        data
    )
}

// 小程序登录-
export const wxMiniLogin = (data) => {
    return request(
        'POST',
        '/user/web/wxMini/login',
        data
    )
}


export const getBannertist = (params) => {
    return request(
        'GET',
        '/user/web/banner/list',
        params
    )
}


export const getCompanytist = (params) => {
    return request(
        'GET',
        '/user/web/company/list',
        params
    )
}

export const getProductist = (params) => {
    return request(
        'GET',
        '/user/web/goods/list',
        params
    )
}


export const getArticletist = (params) => {
    return request(
        'GET',
        '/user/web/article/list',
        params
    )
}



export const getCompanyDetail = (params) => {
    return request(
        'GET',
        '/user/web/company/info',
        params
    )
}


export const getProductDetail = (params) => {
    return request(
        'GET',
        '/user/web/goods/info',
        params
    )
}


export const getArticelDetail = (params) => {
    return request(
        'GET',
        '/user/web/article/info',
        params
    )
}

export const getCrouseDetail = (params) => {
    return request(
        'GET',
        '/user/web/course/info',
        params
    )
}

export const getNewsList = (params) => {
    return request(
        'GET',
        '/user/web/news/list',
        params
    )
}

export const getNewsDetail = (params) => {
    return request(
        'GET',
        '/user/web/news/info',
        params
    )
}


export const getCrouseList = (params) => {
    return request(
        'GET',
        '/user/web/course/list1',
        params
    )
}


export const videoUrl = (params) => {
    return request(
        'GET',
        '/user/web/get/videoUrl',
        params
    )
}



export const getOrder = (params) => {
    return request(
        'GET',
        '/user/web/order/list',
        params
    )
}


export const getworth = (params) => {
    return request(
        'GET',
        '/user/web/get/worth',
        params
    )
}



export const apply = (data) => {
    return request(
        'POST',
        '/user/web/extract/apply',
        data
    )
}


export const getlistzj = (params) => {
    return request(
        'GET',
        '/user/web/expert/list',
        params
    )
}


export const getarea = (params) => {
    return request(
        'GET',
        '/user/web/area/list',
        params
    )
}


export const addAddress = (data) => {
    return request(
        'POST',
        '/user/web/address/add',
        data
    )
}


export const modifyAddress = (data) => {
    return request(
        'POST',
        '/user/web/address/modify',
        data
    )
}


export const getAddres = (params) => {
    return request(
        'GET',
        '/user/web/address/list',
        params
    )
}

export const delAddres = (params) => {
    return request(
        'DELETE',
        `/user/web/address/del?userId=${params.userId}&addressId=${params.addressId}`,
        params
    )
}


export const bindChangeUser = (data) => {
    return request(
        'POST',
        '/user/web/change/bind',
        data
    )
}



export const getUserInfo = (params) => {
    return request(
        'GET',
        '/user/web/get/simple/info',
        params
    )
}